package com.ai.web.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ai.web.service.LoginOutService;
import com.tiny.persistence.domain.BgUser;
import com.tiny.persistence.repository.BgUserRepo;

@Service
public class LoginOutServiceImpl implements LoginOutService {
	
	@Autowired
	private BgUserRepo bgUserRepo;
	
	public BgUser getBgUser(String username, String password) {
		
		
		return bgUserRepo.findByUsernameAndPassword(username, password);
		
	}

    public BgUser getBgUser(String username) {
        
        return bgUserRepo.findByUsername(username);
    }
	

}
